<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
<head>
	<title>产品管理</title>
	<script>
		$(document).ready(function() {
			//聚焦第一个输入框
			$("#user-tab").addClass("active");
		});
	</script>
</head>
<jsp:include page="/WEB-INF/views/common.jsp"/>
<body>
	<c:if test="${not empty message}">
		<div id="message" class="alert alert-success"><button data-dismiss="alert" class="close">×</button>${message}</div>
	</c:if>
    <table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
        <tr>
            <th title="gtin,全球唯一标识,14位数字">GTIN</th>
            <th title="条形码 ">条形码</th>
            <th title="类型  EAN-13等">条形码类型</th>
            <th>商品名称</th>
            <th>商标ID</th>
            <th>产品规格</th>
            <th>产品短描述</th>
            <th>外包装高度</th>
            <th>外包装宽度</th>
            <th>外包装深度</th>
            <th>净含量</th>
            <th>毛重</th>
            <th>净重</th>
            <th>包装类型代码</th>
            <th>包装材料代码</th>
            <th>产品分类代码</th>
            <th>扩展属性</th>
            <th>大图地址</th>
            <th>小图地址</th>
        </tr>
        </thead>
		<tbody>
        <c:forEach items="${list}" var="entity">
			<tr>
                <td>${entity.gtin}</td>
                <td>${entity.codeValue}</td>
				<td>${entity.codeType}</td>
                <td>${entity.itemName}</td>
                <td title="${entity.description}">${entity.shortDescription}</td>
                <td>${entity.height}</td>
                <td>${entity.width}</td>
                <td>${entity.depth}</td>
                <td>${entity.netContent}</td>
                <td>${entity.grossWeight}</td>
                <td>${entity.packagingTypeCode}</td>
                <td>${entity.packagingMaterialCode}</td>
                <td>${entity.classCode}</td>
                <td>${entity.extension}</td>
                <td>${entity.bigPicture}</td>
                <td>${entity.smallPicture}</td>
			</tr>
		</c:forEach>
		</tbody>
        <tfoot>
        <tr align="right">
            <td colspan="12" >
            <a href="${ctx}/web/product/productList?pageNo=1" title="首页">首页</a>
            <a href="${ctx}/web/product/productList?pageNo=${pageVO.pageNo-1}" title="上一页">上一页</a>
            <a href="${ctx}/web/product/productList?pageNo=${pageVO.pageNo+1}" title="下一页">下一页</a>
            <a href="${ctx}/web/product/productList?pageNo=${pageVO.totalPage}" title="尾页">尾页</a>
            ${pageVO.pageNo}/${pageVO.totalPage} 总数:${pageVO.totalCount} 总页数: ${pageVO.totalPage}
            </td>
        </tr>
        </tfoot>
    </table>
</body>
</html>

